package cn.com.surker.base.system.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * ERP仓位、工控仓位修改记录表
 * </p>
 *
 * @author admin
 * @since 2024-12-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysStorageLog extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 仓位ID
     */
    private Long storageId;

    /**
     * 原仓位名称
     */
    private String oldStorage;

    /**
     * 新仓位名称
     */
    private String newStorage;

    /**
     * 材料ID
     */
    private Long materialId;

    /**
     * 材料名称
     */
    private String material;

    /**
     * 生产线ID
     */
    private Long lineId;

    /**
     * 类型(0:ERP仓位1:工控仓位)
     */
    private Integer type;

    /**
     * 生效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date takeTime;
    public SysStorageLog(){}
    public SysStorageLog(Long orgId, Long storageId, String oldStorage, String newStorage, Long materialId, String material,
                         Long lineId, Integer type, Date takeTime, String creator, Date createTime) {
        this.orgId = orgId;
        this.storageId = storageId;
        this.oldStorage = oldStorage;
        this.newStorage = newStorage;
        this.materialId = materialId;
        this.material = material;
        this.lineId = lineId;
        this.type = type;
        this.takeTime = takeTime;
        super.creator = creator;
        super.createTime = createTime;
    }
}
